package com.dongdongshop.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.alibaba.fastjson.JSONObject;
import com.dongdongshop.mapper.TbOrderMapper;
import com.dongdongshop.mapper.TbPayLogMapper;
import com.dongdongshop.pojo.TbOrder;
import com.dongdongshop.pojo.TbOrderExample;
import com.dongdongshop.pojo.TbPayLog;
import com.dongdongshop.service.PayService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
@org.springframework.stereotype.Service
public class PayServiceImpl implements PayService {

    @Resource
    private TbPayLogMapper payLogMapper;

    @Override
    public int insertPayLog(TbPayLog tbPayLog) {

        return payLogMapper.insertSelective(tbPayLog);
    }

    @Override
    public TbPayLog getPayLogById(String out_trade_no) {
        return payLogMapper.selectByPrimaryKey(out_trade_no);
    }

    @Override
    public void updatePayLog(TbPayLog payLog) {
        payLogMapper.updateByPrimaryKeySelective(payLog);
    }
}
